package com.qding.park.manager.app.queue.handle;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.alibaba.fastjson.JSONObject;
import com.qding.park.common.core.exceptions.BaseException;
import com.qding.park.common.core.redis.SerializeUtils;
import com.qding.park.manager.facade.queue.service.ReportFacade;
import com.qding.park.manager.pojo.ap.ApApproachRecord;
import com.qding.park.manager.pojo.ap.ApMonthlyFeeInfo;
import com.qding.park.manager.pojo.queue.QueueMsg;

/**
 * @author Administrator
 *线下月租缴费单
 */
@Component("outlineMonthlyReportHandle")
public class OutlineMonthlyReportHandle extends AbstractReportHandle{
	
	@Autowired
	private ReportFacade  reportFacade;
	@Override
	void actualHandle(QueueMsg msg) throws BaseException {
		JSONObject data = (JSONObject) msg.getData();
		ApMonthlyFeeInfo apMonthlyFeeInfo=SerializeUtils.unSerialize(data.toJSONString(), ApMonthlyFeeInfo.class);
		reportFacade.Park_MonthlyFeeSync(apMonthlyFeeInfo);
		
	}
	@Override
	boolean failDiscardRollBacK(QueueMsg msg) {
		_log.info("线下月租单缴费上报:"+msg);
		return true;
	}

}
